﻿
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/wip/wipList?id=${c1?.id}" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="wipList" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
            <label>产品型号：</label>
            <input name='part_name' value="${part_name}" size="18"/>
            <label>扩散批号：</label>
            <input name="SUBSTRATE_ID1" value="${SUBSTRATE_ID1}" size="18"/>
            <label>客户订单号：</label>
            <input name="CUSTOMER_ORDER" value="${CUSTOMER_ORDER}" size="18"/>

           <br>
            <label>封装形式：</label>
            <input name="RESERVED1" value="${RESERVED1}" size="18"/>
            <label>组装批号：</label>
            <input name="LOT_ID" value="${LOT_ID}" size="18"/>
            <label>工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;步：</label>
            <g:select id="mode" name="STEP_NAME" from="${wipPackage}" data-toggle="selectpicker" data-width="150"
                      data-live-search="true" optionKey="STEP_NAME" optionValue="STEP_NAME" value="${STEP_NAME}"
                      noSelection="['': '--ALL--']"/><br>
            <label>开始时间<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="startTime" class="form-control"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd HH:mm:ss"
                   size="18" id="start-date-input" readonly value="${startTime.format('yyyy-MM-dd HH:mm:ss')}">&nbsp;
            <label>结束时间<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="endTime" class="form-control"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd HH:mm:ss"
                   size="18" id="end-date-input" readonly value="${endTime.format('yyyy-MM-dd HH:mm:ss')}" >&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/wip/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出Excel文件</button>&nbsp;

        </div>
    </form>
</div>
<g:if test="${wipList.size > 0}">
<div class="bjui-pageContent">
        <table data-toggle="tablefixed" data-nowrap="true">
            <thead>
            <tr>
                <th width="40">NO.</th>
                <th width="140">客户订单号</th>
                <th width="118">客户型号</th>
                <th width="70">封装形式</th>
                <th width="80">扩散批号</th>

                <th width="130">产品型号</th>
                <th width="47">优先级</th>
                <th width="140">组装批号</th>
                <th width="62">当前数量</th>
                <th width="62">当前工序</th>
                <th width="62">当前工步</th>
                <th width="300">工步描述</th>
                <th width="60">当前状态</th>
                <th width="68">当前设备</th>
                <th width="78">最后操作人</th>
                <th width="155">最后操作时间</th>
                <th width="50">周记</th>
            </tr>
            </thead>
            <tbody>
            <g:each in="${wipList}" status="i" var="tableInstance">
                <tr>
                    <td width="40">${i+1}</td>
                    <td  width="140">${tableInstance.CUSTOMER_ORDER}</td>
                    <td  width="118">${tableInstance.CUSTOMER_PART_ID}</td>
                    <td width="70">${tableInstance.RESERVED1}</td>
                    <td width="80">${tableInstance.SUBSTRATE_ID1}</td>

                    <td width="130">${tableInstance.part_name}</td>
                    <td width="47">${tableInstance.priority}</td>
                    <td  width="140">${tableInstance.lot_id}</td>
                    <td width="62">${tableInstance.main_qty}</td>
                    <td width="62">${tableInstance.STAGE_ID}</td>
                    <td width="62">${tableInstance.step_name}</td>
                    <td width="300">${tableInstance.step_desc}</td>

                    <td width="60">${tableInstance.state}</td>
                    <td width="68">${tableInstance.equipment_id}</td>
                    <td width="78">${tableInstance.operator1}</td>
                    <td width="155">${tableInstance.updatedtime}</td>
                    <td width="50">${tableInstance.RESERVED4}</td>



                </tr>
            </g:each>
            %{--<tr>--}%
                %{--<td width="60" colspan="4">合计</td>--}%
                %{--<td width="80"colspan="7">${sumNum}</td>--}%
            %{--</tr>--}%
            </tbody>
        </table>

</div>
</g:if>

%{--
<script type="text/javascript">
    $(function () {
        $.CurrentNavtab.find('#start-date-input,#end-date-input').datetimepicker({
            format:'yyyy-mm-dd hh',
            autoclose: true,
            todayBtn: true,
            startView:1,
            minView:1,
            pickerPosition: "bottom-left",
            language:'zh-CN',
            startDate:'2016-01-01'
        });

        $.CurrentNavtab.find('.selectpicker').selectpicker();
    })
</script>--}%
